x86/NUMA: correct off-by-1 in node map population
authorJan Beulich <jbeulich@suse.com>
Wed, 5 Oct 2022 08:55:27 +0000 (10:55 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 5 Oct 2022 08:55:27 +0000 (10:55 +0200)
commit66a5633aa038f4abb4455463755974febac69034
tree65b35b152a4e1fe96be85449294ecead78dd4b69
parent3161231abcb461314b205337fbd0530c7ead1696
x86/NUMA: correct off-by-1 in node map population

As it turns out populate_memnodemap() so far "relied" on
extract_lsb_from_nodes() setting memnodemapsize one too high in edge
cases. Correct the issue there as well, by changing "epdx" to be an
inclusive PDX and adjusting the respective relational operators.

While there also limit the scope of both related variables.

Fixes: b1f4b45d02ca ("x86/NUMA: correct off-by-1 in node map size calculation")
Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Release-acked-by: Henry Wang <Henry.Wang@arm.com>
xen/arch/x86/numa.c